//
//  HMSettingModel.m
//  Setting
//
//  Created by 李贺 on 2017/1/4.
//  Copyright © 2017年 李贺. All rights reserved.
//

#import "HMSettingModel.h"

@implementation HMSettingModel

+ (instancetype)makeModelWithDict:(NSDictionary *)dict{
    id model = [[self alloc] init];
    [model setValuesForKeysWithDictionary:dict];
    return model;
}


#pragma mark - 加载数据
+ (NSArray *)loadSetMenuData {
    
    NSArray *array = [NSArray arrayWithContentsOfURL:[[NSBundle mainBundle] URLForResource:@"settingPlist.plist" withExtension:nil]];
    
    NSMutableArray *arrayM = [NSMutableArray arrayWithCapacity:array.count];
    
    [array enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
        HMSettingModel * model = [HMSettingModel makeModelWithDict:obj];
        [arrayM addObject:model];
    }];
    return arrayM.copy;
}
@end
